<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>nmrglue.fileiobase &mdash; nmrglue v0.1 documentation</title>
    <link rel="stylesheet" href="../_static/sphinxdoc.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.1',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="nmrglue v0.1 documentation" href="../index.html" />
    <link rel="up" title="Reference Guide" href="index.html" />
    <link rel="next" title="nmrglue.pipe" href="pipe.html" />
    <link rel="prev" title="nmrglue.convert" href="convert.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="pipe.html" title="nmrglue.pipe"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="convert.html" title="nmrglue.convert"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">nmrglue v0.1 documentation</a> &raquo;</li>
          <li><a href="index.html" accesskey="U">Reference Guide</a> &raquo;</li> 
      </ul>
    </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h3><a href="../index.html">Table Of Contents</a></h3>
            <ul>
<li><a class="reference external" href="#">nmrglue.fileiobase</a><ul>
<li><a class="reference external" href="#low-level-functions">Low-Level Functions</a></li>
<li><a class="reference external" href="#low-level-classes">Low-Level Classes</a></li>
</ul>
</li>
</ul>

            <h4>Previous topic</h4>
            <p class="topless"><a href="convert.html"
                                  title="previous chapter">nmrglue.convert</a></p>
            <h4>Next topic</h4>
            <p class="topless"><a href="pipe.html"
                                  title="next chapter">nmrglue.pipe</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="../_sources/reference/fileiobase.txt"
                     rel="nofollow">Show Source</a></li>
            </ul>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="../search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-nmrglue.fileio.fileiobase">
<h1>nmrglue.fileiobase<a class="headerlink" href="#module-nmrglue.fileio.fileiobase" title="Permalink to this headline">¶</a></h1>
<p>fileiobase provides general purpose NMR file IO functions and classes
used by multiple nmrglue.fileio modules</p>
<p>This modules is imported as nmrglue.fileiobase and can be called as such.</p>
<div class="section" id="low-level-functions">
<h2>Low-Level Functions<a class="headerlink" href="#low-level-functions" title="Permalink to this headline">¶</a></h2>
<p>These functions are typically not used directly by users.  They are called by
high level functions.</p>
<dl class="function">
<dt id="nmrglue.fileio.fileiobase.create_blank_udic">
<tt class="descclassname">nmrglue.fileio.fileiobase.</tt><tt class="descname">create_blank_udic</tt><big>(</big><em>ndim</em><big>)</big><a class="headerlink" href="#nmrglue.fileio.fileiobase.create_blank_udic" title="Permalink to this definition">¶</a></dt>
<dd>Create a blank universal dictionary for a ndim-D spectrum</dd></dl>

<dl class="function">
<dt id="nmrglue.fileio.fileiobase.open_towrite">
<tt class="descclassname">nmrglue.fileio.fileiobase.</tt><tt class="descname">open_towrite</tt><big>(</big><em>filename</em>, <em>overwrite=False</em><big>)</big><a class="headerlink" href="#nmrglue.fileio.fileiobase.open_towrite" title="Permalink to this definition">¶</a></dt>
<dd><p>Open filename for writing and return file object</p>
<p>Function checks if file exists (and raises IOError if overwrite=False) and
creates necessary directiories as needed.</p>
</dd></dl>

<dl class="function">
<dt id="nmrglue.fileio.fileiobase.ndfrom_iter">
<tt class="descclassname">nmrglue.fileio.fileiobase.</tt><tt class="descname">ndfrom_iter</tt><big>(</big><em>shape</em>, <em>slices</em><big>)</big><a class="headerlink" href="#nmrglue.fileio.fileiobase.ndfrom_iter" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="nmrglue.fileio.fileiobase.ndto_iter">
<tt class="descclassname">nmrglue.fileio.fileiobase.</tt><tt class="descname">ndto_iter</tt><big>(</big><em>shape</em>, <em>slices</em><big>)</big><a class="headerlink" href="#nmrglue.fileio.fileiobase.ndto_iter" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="nmrglue.fileio.fileiobase.ndtofrom_iter">
<tt class="descclassname">nmrglue.fileio.fileiobase.</tt><tt class="descname">ndtofrom_iter</tt><big>(</big><em>shape</em>, <em>slices</em><big>)</big><a class="headerlink" href="#nmrglue.fileio.fileiobase.ndtofrom_iter" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="nmrglue.fileio.fileiobase.size_and_ndtofrom_iter">
<tt class="descclassname">nmrglue.fileio.fileiobase.</tt><tt class="descname">size_and_ndtofrom_iter</tt><big>(</big><em>shape</em>, <em>slices</em><big>)</big><a class="headerlink" href="#nmrglue.fileio.fileiobase.size_and_ndtofrom_iter" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="nmrglue.fileio.fileiobase.index2trace_flat">
<tt class="descclassname">nmrglue.fileio.fileiobase.</tt><tt class="descname">index2trace_flat</tt><big>(</big><em>shape</em>, <em>index</em><big>)</big><a class="headerlink" href="#nmrglue.fileio.fileiobase.index2trace_flat" title="Permalink to this definition">¶</a></dt>
<dd>Calculate trace number from shape and index of all indirect dimensions
assuming a flat structure</dd></dl>

<dl class="function">
<dt id="nmrglue.fileio.fileiobase.trace2index_flat">
<tt class="descclassname">nmrglue.fileio.fileiobase.</tt><tt class="descname">trace2index_flat</tt><big>(</big><em>shape</em>, <em>ntrace</em><big>)</big><a class="headerlink" href="#nmrglue.fileio.fileiobase.trace2index_flat" title="Permalink to this definition">¶</a></dt>
<dd>Calculate the index of a trace assuming a flat structure</dd></dl>

<dl class="function">
<dt id="nmrglue.fileio.fileiobase.index2trace_opp">
<tt class="descclassname">nmrglue.fileio.fileiobase.</tt><tt class="descname">index2trace_opp</tt><big>(</big><em>shape</em>, <em>index</em><big>)</big><a class="headerlink" href="#nmrglue.fileio.fileiobase.index2trace_opp" title="Permalink to this definition">¶</a></dt>
<dd>Calculate trace number from shape and index of all indirect dimensions
assuming a phase ordering opposite the time increments.</dd></dl>

<dl class="function">
<dt id="nmrglue.fileio.fileiobase.trace2index_opp">
<tt class="descclassname">nmrglue.fileio.fileiobase.</tt><tt class="descname">trace2index_opp</tt><big>(</big><em>shape</em>, <em>ntrace</em><big>)</big><a class="headerlink" href="#nmrglue.fileio.fileiobase.trace2index_opp" title="Permalink to this definition">¶</a></dt>
<dd>Calculate the index of a trace assuming opposite phase/time increment 
ordering</dd></dl>

<dl class="function">
<dt id="nmrglue.fileio.fileiobase.index2trace_reg">
<tt class="descclassname">nmrglue.fileio.fileiobase.</tt><tt class="descname">index2trace_reg</tt><big>(</big><em>shape</em>, <em>index</em><big>)</big><a class="headerlink" href="#nmrglue.fileio.fileiobase.index2trace_reg" title="Permalink to this definition">¶</a></dt>
<dd>Calculate trace number from shape and index of all indirect dimensions
assuming the same  phase and time ordering.</dd></dl>

<dl class="function">
<dt id="nmrglue.fileio.fileiobase.trace2index_reg">
<tt class="descclassname">nmrglue.fileio.fileiobase.</tt><tt class="descname">trace2index_reg</tt><big>(</big><em>shape</em>, <em>ntrace</em><big>)</big><a class="headerlink" href="#nmrglue.fileio.fileiobase.trace2index_reg" title="Permalink to this definition">¶</a></dt>
<dd>Calculate the index of a trace assuming the same phase/time increment 
ordering</dd></dl>

</div>
<div class="section" id="low-level-classes">
<h2>Low-Level Classes<a class="headerlink" href="#low-level-classes" title="Permalink to this headline">¶</a></h2>
<p>These classes are typically not used directly by users.  They are extended or
called by high level classes or functions.</p>
<dl class="class">
<dt id="nmrglue.fileio.fileiobase.unit_conversion">
<em class="property">class </em><tt class="descclassname">nmrglue.fileio.fileiobase.</tt><tt class="descname">unit_conversion</tt><big>(</big><em>size</em>, <em>cplx</em>, <em>sw</em>, <em>obs</em>, <em>car</em><big>)</big><a class="headerlink" href="#nmrglue.fileio.fileiobase.unit_conversion" title="Permalink to this definition">¶</a></dt>
<dd>object provides methods to convert between common nmr units</dd></dl>

<dl class="class">
<dt id="nmrglue.fileio.fileiobase.data_nd">
<em class="property">class </em><tt class="descclassname">nmrglue.fileio.fileiobase.</tt><tt class="descname">data_nd</tt><big>(</big><em>order</em><big>)</big><a class="headerlink" href="#nmrglue.fileio.fileiobase.data_nd" title="Permalink to this definition">¶</a></dt>
<dd><p>data_nd emulates numpy.ndarray object without loading data into memory</p>
<ul class="simple">
<li>slicing operations return ndarray objects</li>
<li>can iterate over with expected results</li>
<li>transpose and swapaxes functions create a new data_nd object with the
new axes ordering</li>
<li>has ndim, shape, and dtype attributes.</li>
</ul>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../modindex.html" title="Global Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="pipe.html" title="nmrglue.pipe"
             >next</a> |</li>
        <li class="right" >
          <a href="convert.html" title="nmrglue.convert"
             >previous</a> |</li>
        <li><a href="../index.html">nmrglue v0.1 documentation</a> &raquo;</li>
          <li><a href="index.html" >Reference Guide</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright 2010, Jonathan J. Helmus.
      Last updated on Apr 04, 2011.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.4.
    </div>
  </body>
</html>